package com.chinacoal.microservice.mapper;

import com.baomidou.mybatisplus.mapper.BaseMapper;
import com.baomidou.mybatisplus.plugins.Page;
import com.chinacoal.microservice.pojo.CcmsSmartleasingHouseType;
import io.swagger.models.auth.In;
import org.apache.ibatis.annotations.Param;

import java.util.Date;
import java.util.List;

/**
 * @author zhuliang
 * @version V1.0
 * @Description: 房源管理-户型管理-mybatis-plus的接口类
 * @date 2020-11-11 11：26
 */
public interface CcmsSmartleasingHouseTypeMapper extends BaseMapper<CcmsSmartleasingHouseType> {

    /**
     * @Description: 批量修改（批量删除）
     * @author zhuliang
     * @date 2020/11/11 14:07
     */
    void updateToDeleteById(@Param("deleteSign") String deleteSign,
                            @Param("lastUpdateDate") Date lastUpdateDate,
                            @Param("pkHouseTypeId") String pkHouseTypeId,
                            @Param("lastUpdatedBy") Integer lastUpdatedBy,
                            @Param("fkPropertyCompanyId") String fkPropertyCompanyId,
                            @Param("fkAdministrativeOfficeId") String fkAdministrativeOfficeId);

    /**
     * @Description: 根据楼宇id查询户型信息
     * @author zhuliang
     * @date 2020/11/24 11:03
     */
    List<CcmsSmartleasingHouseType> getAllByBuildingId(@Param("fkBuildingId") String fkBuildingId,
                                                       @Param("fkPropertyCompanyId") String fkPropertyCompanyId,
                                                       @Param("fkAdministrativeOfficeId") String fkAdministrativeOfficeId);

    /**
     * @Description: 根据楼宇id查询户型数
     * @author zhuliang
     * @date 2020/11/24 15:23
     */
    String getCountByBuildingId(@Param("fkBuildingId") String fkBuildingId);

    /**
     * @Description: 分页查询所有的户型信息
     * @author zhuliang
     * @date 2020/12/1 14:21
     */
    List<CcmsSmartleasingHouseType> getAllByPage(Page<CcmsSmartleasingHouseType> toPage,
                                                 @Param("fkPropertyCompanyId") String fkPropertyCompanyId,
                                                 @Param("fkAdministrativeOfficeId") String fkAdministrativeOfficeId);

    /**
     * @Description: 根据户型id查询户型信息
     * @author zhuliang
     * @date 2021/1/13 9:34
     */
    CcmsSmartleasingHouseType getHouseTypeById(@Param("pkHouseTypeId") String pkHouseTypeId,
                                               @Param("fkPropertyCompanyId") String fkPropertyCompanyId,
                                               @Param("fkAdministrativeOfficeId") String fkAdministrativeOfficeId);

    /**
     * @Description: 条件查询所有的户型信息带分页
     * @author zhuliang
     * @date 2020/12/1 14:51
     */
    List<CcmsSmartleasingHouseType> getAllByCondition(@Param("fkRoomTypeId") String fkRoomTypeId,
                                                      @Param("inputString") String inputString,
                                                      @Param("provinceId") String provinceId,
                                                      @Param("cityId") String cityId,
                                                      @Param("areaId") String areaId,
                                                      @Param("fkBuildingId") String fkBuildingId,
                                                      @Param("fkPropertyCompanyId") String fkPropertyCompanyId,
                                                      @Param("fkAdministrativeOfficeId") String fkAdministrativeOfficeId,
                                                      Page<CcmsSmartleasingHouseType> toPage);

    /**
     * @Description: 根据户型名称查询户型id
     * @author zhuliang
     * @date 2021/1/25 17:02
     */
    String getIdByName(@Param("houseTypeName") String houseTypeName,
                       @Param("fkBuildingId") String fkBuildingId);
}
